//
//  Film.m
//  OC07_内存管理
//
//  Created by Scott on 16/3/4.
//  Copyright © 2016年 Scott. All rights reserved.
//

#import "Film.h"

@implementation Film

#pragma mark - dealloc
- (void)dealloc {
    
    [_name release];
    [_director release];
    [super dealloc];
}

#pragma mark - Creating and Init Film
- (instancetype)initWithName:(NSString *)name director:(NSString *)director time:(NSInteger)time {
    
    self = [super init];
    if (self) {
        _name = [name copy];
        _director = [director copy];
        _time = time;
    }
    return self;
}

+ (instancetype)filmWithName:(NSString *)name director:(NSString *)director time:(NSInteger)time {
    
    return [[[Film alloc] initWithName:name director:director time:time] autorelease];
}











@end
